x

Mersenne-Twister

It is the default PRNG in Python, and is in the STL in C++ (C uses Linear Congruential Generator (LCG)). It is based on Linear Feedback Shift Register (LFSR), and hence, is reversible, and therefore not suitable for cryptography, but is good for use in physics simulations.

Algorithm

Brief

  • Period: \(2^{19937} - 1\)
  • Dimensions: \(624\)
  • State Size: \(624 \times 32\)
  • Word Size: 32 bits

Algorithm

  • Seeding
  • Twisting
  • Tempering

Drawbacks

Seeding Surprises

Reverse Engineering

Left-click: follow link, Right-click: select node, Scroll: zoom
x